{template '_header'}

<div class="page-header">
    当前位置：<span class="text-primary">小票打印设置</span>
</div>

<div class="page-content">
    <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
        <div class="form-group">
            <label class="col-lg control-label">选择订单打印机</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.printer.set'}
                <?php echo tpl_selector('order_printer',array(
             'preview'=>true,
                'readonly'=>true,
                'nokeywords'=>true,
                'multi'=>1,
                'value'=>$item['title'],
                'url'=>webUrl('sysset/printer/printer_query'),
                'items'=>$order_printer_array,
                'buttontext'=>'选择打印机',
                'placeholder'=>'请选择打印机')
                )?>
                {else}
                <div class="input-group multi-img-details container ui-sortable">
                    {loop $order_printer_array $item}
                    <div data-name="goodsid" data-id="{$item['id']}" class="multi-item">
                        <img src="{php echo tomedia($item['thumb'])}" class="img-responsive img-thumbnail">
                        <div class="img-nickname">{$item['title']}</div>
                    </div>
                    {/loop}
                </div>

                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">选择订单打印模板</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.printer.set'}
                <select class='form-control' name='order_template'>
                    <option >选择您需要的订单打印模板</option>
                    {loop $order_template $value}
                    <option value="{$value['id']}" {if $value['id']==$data['order_template']}selected{/if}>{$value['title']}</option>
                    {/loop}
                </select>
                {else}
                <div class='form-control-static'>
                    {if empty($data['order_template'])}选择您需要的订单打印模板{else}{$data['order_template']}{/if}
                </div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">订单打印方式</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.notice.edit'}
                <label class="checkbox-inline">
                    <input type="checkbox" value="1" name='ordertype[]' {if in_array('1',$ordertype)}checked{/if} /> 下单打印
                </label>
                <label class="checkbox-inline">
                    <input type="checkbox" value="2" name='ordertype[]' {if in_array('2',$ordertype)}checked{/if} /> 付款打印
                </label>
                <label class="checkbox-inline">
                    <input type="checkbox" value="3" name='ordertype[]' {if in_array('3',$ordertype)}checked{/if} /> 确认收货打印
                </label>
                <div class="help-block">通知商家方式</div>
                {else}
                <input type="hidden" name="data[ordertype]" value="{$data['ordertype']}" />
                <div class='form-control-static'>{if in_array('1',$ordertype)}下单打印;{/if}{if in_array('2',$ordertype)}付款打印;{/if}{if in_array('3',$ordertype)}确认收货打印;{/if}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">多商户订单</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.printer.set'}
                <label class="radio-inline"><input type="radio" name="printer_merch" value="0" {if empty($data['printer_merch'])}checked{/if}> 不打印</label>
                <label class="radio-inline"><input type="radio" name="printer_merch" value="1" {if !empty($data['printer_merch'])}checked{/if}> 打印</label>
                {else}
                <div class='form-control-static'>{if empty($data['printer_merch'])}不打印{else}打印{/if}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label"></label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.printer.set'}
                <input type="submit" value="提交" class="btn btn-primary"/>
                {/if}
            </div>
        </div>

    </form>
</div>

{template '_footer'}